package hu.mapro.gwtui.client.model;

public class ToStringLabelProvider<T> implements LabelProvider<T> {

	@Override
	public String getLabel(T object) {
		if (object==null) return null;
		return object.toString();
	}

	public static final ToStringLabelProvider<Object> INSTANCE = new ToStringLabelProvider<Object>();
	
	@SuppressWarnings("unchecked")
	public static final <T> ToStringLabelProvider<T> instance() {
		return (ToStringLabelProvider<T>) INSTANCE;
	}
	
}
